home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14417 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: nntp1.best.com!zenin
  2. From: Zenin <zenin@best.com>
  3. Newsgroups: comp.lang.perl.misc,comp.lang.c
  4. Subject: Re: PROGRAMERS OF ANY LANGUAGE
  5. Date: 14 Apr 1996 18:29:05 GMT
  6. Organization: Rocky Horror, Barely Legal (Berkeley, CA)
  7. Message-ID: <4krg5h$7tt@nntp1.best.com>
  8. References: <Pine.SOL.3.91.960329010021.13209A-100000@harvey> <316A6189.4287@wight.hursley.ibm.com> <4kg58c$djh@kalypso.cybercom.net> <4kqe6q$1tm@innocence.interface-business.de> <4kr869INN35k@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: shellx.best.com
  10.  
  11. Kazimir Kylheku <c2a192@ugrad.cs.ubc.ca> wrote:
  12.     >snip<
  13. : The programmer is forced to ``disambiguate'':
  14. :     if (....) {
  15. :         if (....) {    
  16. :             if (....) {
  17. :                 statement;
  18. :             }
  19. :         }
  20. :     } else {
  21. :         statement;
  22. :     }
  23. : What a PITA. (And I ain't referring to an Italian meal also known as a pizza
  24. : pocket, either).
  25.  
  26.     You don't program much, do you? :)
  27.  
  28.         if( ... && ... && ... ) {
  29.             statement;
  30.         } else {
  31.             statement;
  32.         }
  33.  
  34.     Or if you must indent each test
  35.  
  36.         if( ... &&
  37.                 ... &&
  38.                 ... ) {
  39.                 statement;
  40.         }
  41.  
  42.     Either way the code is cleaner & faster.
  43.     But wait, you want to now put statements after each?  In that case
  44.     you are back to {} in either language, as you should be since you
  45.     then have a combined statement again.
  46.  
  47.     It's still hard for me to understand even though good perl code is
  48.     normaly less then 1/10 the size of simlar code in nearly any other
  49.     language, that people still complain about having to "waste" time
  50.     typing a couple }{'s or )('s here and there... ;-/
  51.  
  52.     :)
  53. ______
  54.      /  Spelling mistakes?  Their couldn't be. -My modem is error correcting.
  55.     /
  56.    /    Zenin@Best.com                   ---->>ROCKY HORROR ARCHIVE<<----
  57.   /      ___    __  o   __
  58.  /      /___\ |/  \ | |/  \                 http://www.best.com/~zenin/
  59. /_______\___  |   | | |   |_______________________________________________
  60.